This document explains how to replicate the results reported in "Intergenerational Transmission of Party Affiliation Within Political Families" by Linuz Aggeborn and P�r Nyman.

The empirical analysis use individual level data from registers, and since Statistics Sweden/the Swedish government prohibits the public dissemination of individual-level registry data (this is regulated in the Swedish Public Access to Information and Secrecy Act), the authors are under contractual obligation not to disseminate the data to other individuals. The editors of Political Behavior have therefore granted us an exception to the general policy of full data access. To ensure transparency, we provide both a description of how interested researchers can get access to restricted data and the do-files that we used to create the data and run the analyses, together with the corresponding log files.



HOW TO ACCESS DATA

First of all, we welcome qualified researchers to visit Sweden, where the results found in the paper can be replicated without violating Swedish government regulations. Because we would need approval from the Ethical Review Board to give another researcher access to our data, this solution requires that the researcher in question reaches out to us before he or she would like to make us a visit. Second, any researcher may order the exact same data material from Statistics Sweden (SCB). You may find additional information (in Swedish) on how to proceed here: http://www.scb.se/sv_/Vara-tjanster/Bestalla-mikrodata. To facilitate this process, we have in the online appendix provided a list of the variables necessary for replication and a more detailed description on how to access the data used.



DO FILES INCLUDED IN THIS ARCHIVE

masterdo		A wrapper for running the other do files in the correct order.
File preparation	Preparing raw data to facilitate mergers.
Data management 	File mergers and variable creation.
dataanalysis		Creating the output shown in the paper and the online appendix.

We also include log files for the latter three do files, to show the output created by each operation.



COMPUTING ENVIRONMENT

The output in the paper has been produced with Stata 15.1 on a server with the following specification: Intel(R) Core i9 3.3 GHz, 128 GB RAM and Windows Server 2016 Standard. 



